import request from "@/utils/request";

// 查询订单支付列表
export function listOrder(query) {
  return request({
    url: "/station/historyOrder/list",
    method: "get",
    params: query,
  });
}

// 查询订单支付列表
export function listAllOrder(query) {
  return request({
    url: "/station/historyOrder/allList",
    method: "get",
    params: query,
  });
}

// 查询订单支付详细
export function getOrder(orderId) {
  return request({
    url: "/station/historyOrder/" + orderId,
    method: "get",
  });
}
// 当前订单退款
export function refund(orderId) {
  return request({
    url: "/station/historyOrder/refund/" + orderId,
    method: "get",
  });
}
// 恢复当前订单
export function reback(orderId) {
  return request({
    url: "/station/historyOrder/reback/" + orderId,
    method: "get",
  });
}

// 新增订单支付
export function addOrder(data) {
  return request({
    url: "/station/historyOrder",
    method: "post",
    data: data,
  });
}

// 修改订单支付
export function updateOrder(data) {
  return request({
    url: "/station/historyOrder",
    method: "put",
    data: data,
  });
}

// 删除订单支付
export function delOrder(orderId) {
  return request({
    url: "/station/historyOrder/" + orderId,
    method: "delete",
  });
}

// 导出订单支付
export function exportOrder(query) {
  return request({
    url: "/station/historyOrder/export",
    method: "get",
    params: query,
  });
}
/**
 * 补打标签
 */
export function printOrderInfo(query) {
  return request({
    url: "/station/historyOrder/feiePush",
    method: "get",
    params: query,
  });
}

// 导出lng集团订单
export function exportLngOrderGroup(query) {
  return request({
    url: "/station/order/LNGExport",
    method: "get",
    params: query,
  });
}

// 导出lng站点订单
export function exportLngOrderStation(query) {
  return request({
    url: "/station/order/LNGDeptExport",
    method: "get",
    params: query,
  });
}

// 查询站点订单
export function queryGroupOrder(query) {
  return request({
    url: "/station/order/LNGlist",
    method: "get",
    params: query,
  });
}

// 查询积分消费订单详细
export function queryStationOrder(query) {
  return request({
    url: "/station/order/LNGDeptList",
    method: "get",
    params: query,
  });
}

// 查询各油企总体数据
export function listEnterpriseData(query) {
  return request({
    url: "/station/order/selectStatisticsPayOrderList",
    method: "get",
    params: query,
  });
}

// 查询各油企总体数据
export function listEnterpriseDataExport(query) {
  return request({
    url: "/station/order/selectStatisticsPayOrderListExport",
    method: "get",
    params: query,
  });
}

// 查询订单支付列表
export function selectSumPayOrder(query) {
  return request({
    url: "/station/historyOrder/selectPayOrderSum",
    method: "get",
    params: query,
  });
}

// 删除历史订单
export function delOrderDeletePay(ids) {
  return request({
    url: "/station/order/deletePay",
    method: "delete",
    data: ids,
  });
}

// 删除所有历史订单  /station/order/deleteAllPay
export function deleteAllPayg(data) {
  return request({
    url: "/station/order/deleteAllPay",
    method: "delete",
    data: data,
  });
}

// 查询油企
export function enterpriseList(query) {
  return request({
    url: "/enterprise/info/list",
    method: "get",
    params: query,
  });
}

// 获取开票记录
export function getInvoiceListApi(OrderNo) {
  return request({
    url: "/station/order/getInvoiceRecords",
    method: "get",
    params: { OrderNo },
  });
}

// 获取开票记录余额明细  /prod-api/station/order/getInvoiceRecords
export function getInvoiceLis(query) {
  return request({
    url: "/station/order/getInvoiceRecords",
    method: "get",
    params: query,
  });
}
